package sg.nus.iss.vmcs.gui.elements;

import java.awt.Component;
import java.awt.GridLayout;
import java.awt.Panel;

/**
 * Implementation of the ItemDisplayStrategy, displays items in a vertical manner
 * @author Philip Chew
 */
public class GridItemDisplayStrategy implements ItemDisplayStrategy {
	/**
	 * Sets up the panel layout
	 */
	@Override
	public void setupPanelLayout(Panel panel, Component... components) {
		panel.setLayout(new GridLayout(1, components.length));
		
		for(Component component : components) {
			panel.add(component);
		}
	}
}
